from fastapi import FastAPI, HTTPException, status
from fastapi.middleware.cors import CORSMiddleware

from routers import auth, customers, cards, trades, statistics

app = FastAPI()

app.add_middleware(
    CORSMiddleware,
    allow_origins=["http://localhost:3000"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(auth.router)
app.include_router(customers.router)
app.include_router(cards.router)
app.include_router(trades.router)
app.include_router(statistics.router)

@app.get("/")
async def root():
    return {"message": "Hello from SomeBank Backend"}
